using System.Collections;
using System.Collections.Generic;
using EventUtils;

namespace View.Instant
{
    public class PublicEventCenter : View
    {
        public override void OnLoad()
        {
            base.OnLoad();
        }

        /// <summary>
        /// 接收恭喜获得的通知，然后弹出弹窗
        /// </summary>
        /// <param name="item"></param>
        private void OnGongxihuode(List<PropItemEnum> item)
        {
            UIManager.Instance.Show(ViewName.GongxihuodeView, ViewLayer.Middle, item);
        }
        
        public override void OnShow(params object[] args)
        {
            base.OnShow();
            EventCenter.AddListener<List<PropItemEnum>>(EventType.EVENT_GONGXIHUODE,OnGongxihuode);
        }

        public override void OnClose(params object[] args)
        {
            base.OnClose();
            EventCenter.AddListener<List<PropItemEnum>>(EventType.EVENT_GONGXIHUODE,OnGongxihuode);
        }
    }
}

